<?php

# Check Login - if not logged in, send user to loginform
# -----------------------------------------------------------------------------------------
session_start ();
if ( !isset ( $_SESSION["user_id"] ) ) {
	$redirect = "http://". $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . "?" . $_SERVER['QUERY_STRING'];
	header ( "Location: /loginForm.php?landing_page=" . base64_encode( $redirect ) );
}
?>